package com.example.pay_service.Dao;


import com.example.pay_service.vo.Card;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @title: CardDao
 * @projectName mall
 * @description: TODO
 * @author TLJ
 * @date 2021/12/916:59
 */

@Repository
@Mapper
public interface CardDao {

    @Select("select * from card where user_id=#{user_id}")
    @Results(
            {
                    @Result(property = "user_id",column = "user_id"),
                    @Result(property = "card_id",column = "card_id"),
                    @Result(property = "card_number",column = "card_number"),
                    @Result(property = "phone",column = "phone"),
                    @Result(property = "phone_id",column = "phone_id"),
                    @Result(property = "phone_name",column = "phone_name"),
            }
    )
   List<Card> showcard(int user_id);
}
